package com.evan.designpatterns.proxy.staticproxy;

/**
 * @author :liujiapeng01
 * @date :2019-03-14 18:25
 **/
public class Proxy implements Subject {

    private Subject subject;

    public Proxy(Subject subject) {
        this.subject = subject;
    }

    @Override
    public void request() {
        before();
        subject.request();
        after();
    }

    private void after() {
        System.out.println("after");
    }

    private void before() {
        System.out.println("before");
    }


}
